<%@ page language="java"  import="java.util.*" pageEncoding="UTF-8"%>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'Jsp.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
    This is my JSP page. <br>
    <%out.println("Your IP address is " + request.getRemoteAddr()); %>
    <%out.println("你的IP地址是 " + request.getRemoteAddr()); %>
    <%int i=10 ;
    out.println(i);
    
    %>
    <%!String string="变量声明也可以前面加 ！"; 
    
    %><br>
    <%out.println(string); %>
    <br><hr>
    <%=new Date() %>
    <!-- 叹号这种注释在浏览器中可看见 -->
    <%--百分号注释不能被看见不能被编译 --%>
    <hr><br>
   <%@include file="include1.jsp" %>
   <br/><hr/>
    <%out.println("动态引入页面传输参数"); %>
  <jsp:include page="include2.jsp">
  	<jsp:param value="li" name="name"/>
  </jsp:include>
  <br/> 
  <%out.println("使用userbeen属性赋值获取值"); %><br/>
  <jsp:useBean id="admin" class="Been.Admin"> 
  </jsp:useBean>
  <jsp:setProperty property="adminName" name="admin" value="ZS"/>
  <jsp:getProperty property="adminName" name="admin"/>
  <br/>
  <jsp:element name="book">
  <jsp:attribute name="name">
  java
  </jsp:attribute>
  <jsp:body>
  第一版       
  </jsp:body>
  </jsp:element>
  <br/>
 <!--  <jsp:forward page="dongzuo.jsp">
  <jsp:param value="133" name="name"/>
  </jsp:forward>--> 
  </body>
</html>
